<%@ include file="/WEB-INF/jsp/include/head.jsp" %><%@ page language="java" pageEncoding="UTF-8"%><%@ taglib uri="http://www.geeksaga.com/pagination-taglib" prefix="bbs" %>
<%@ include file="/WEB-INF/jsp/include/skin_head.jsp" %>
<html>
<head>
	<%@ include file="/WEB-INF/jsp/include/manager_title.jsp" %>
	<%@ include file="/WEB-INF/jsp/include/manager_common_css.jsp" %>
    <%@ include file="/WEB-INF/jsp/include/common_script.jsp" %>
    <script type="text/javascript">
    //<![CDATA[
    <%@ include file="/js/bbs/bbs.js" %>

    function bbsAdmin(bbsId, cnt) {
        if(bbsId != "") {//게시판 조회 
            $("#bbsId").attr("value", bbsId);
        	$("#command").attr("value", "VIEW");
        	$("#cnt").attr("value", cnt);
        } else //게시판 설정 저장
        	$("#command").attr("value", "MODIFY");
    	$("#bbsAuthoritySave").submit();
    }
  //]]>
    </script>
</head>
<body>
<%@ include file="/WEB-INF/jsp/include/manager_top.jsp" %>
<%@ include file="/WEB-INF/jsp/include/adminBbsEachMgntSubMenu.jsp" %>
<form:form id="bbsAuthoritySave" method="post" action="bbsDefaultSet.do" modelAttribute="bbsType" >
	<input type="hidden" id="command" name="command" value="VIEW" />
	<input type="hidden" id="bbsId" name="bbsId" value="${param.bbsId}" />
	<input type="hidden" id="type" name="type" value="AuthoritySet" />
	${param.bbsId}
    <div id="pw_bbs_list">
        <div id="pw_bbs_list_header" style="height: 30"></div>
        <div id="pw_bbs_list_body">
	        <table border="0" cellspacing="0" cellpadding="0" width="100%" >
	        	<tr>
	        		<td align="center">
	        			<br></br>
	        			<spring:message code="bbsAdmin.authComment" />
	        		</td>
	        	</tr>
            </table>
            <table width="700" cellspacing="0" cellpadding="2" border="1">
            	<tbody>
            		<tr>
            			<td align="center">
            				<spring:message code="bbsAdmin.listGrade" />
            			</td>
            			<td align="center">
            				<form:select path="listGrade">
                                <form:options items="${authorityCode}" />
            				</form:select>
            			</td>
            		</tr>
            		<tr>
            			<td align="center">
            				<spring:message code="bbsAdmin.viewGrade" />
            			</td>
            			<td align="center">
            				<form:select path="viewGrade">
                                <form:options items="${authorityCode}" />
            				</form:select>
            			</td>
            		</tr>
            		<tr>
            			<td align="center">
            				<spring:message code="bbsAdmin.writeGrade" />
            			</td>
            			<td align="center">
            				<form:select path="writeGrade">
                                <form:options items="${authorityCode}" />
            				</form:select>
            			</td>
            		</tr>
            		<tr>
            			<td align="center">
            				<spring:message code="bbsAdmin.memoGrade" />
            			</td>
            			<td align="center">
            				<form:select path="memoGrade">
                                <form:options items="${authorityCode}" />
            				</form:select>
            			</td>
            		</tr>
            	</tbody>
            </table>
            <table width="700" >
				<tr>
           			<td align="center">
           				<input type="button"  value="저장" name="bbsAdminSave" onclick="bbsAdmin('','');"/>
           			</td>
           			<td align="center">
           			<!--  	<input type="button"  value="목록" name="bbsAdminList" onclick="bbsAdmin('','');"/> -->
           				<a href="<c:url value="/admin/adminBbsList.do?Type=AuthoritySet"/>">목록</a>
           			</td>
           		</tr>
			</table>
        </div>
    </div>
	<%@ include file="/WEB-INF/jsp/include/footer.jsp" %>
	</form:form>
</body>
</html>